package biz.inspeed.test.socket;

import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class SocketServer1
{

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main ( String [ ] args ) throws IOException
	{
		int port = 9999;
		String host = "127.0.0.1";
		
		ServerSocket server = new ServerSocket ( port );
		Socket client = server.accept ();
		String msg  = "QUIT";
		InputStream in = client.getInputStream ();
		int flag;
		System.out.println ("-------------------------------------");
		while((flag = in.read ()) != -1){
			System.out.println ("READ>>:"  + flag);
		}

	}

}
